package modules.program.view;

import java.awt.Toolkit;

import etc.Language;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;


import java.awt.BorderLayout;


@SuppressWarnings("javadoc")
public class ProgramFrame extends JFrame
{

	private JTabbedPane tabbedPane;

	public ProgramFrame()
	{
		//Window preferences
		int windowWidth = 800;
		int windowHeight = 500;
		int windowX = (int)((Toolkit.getDefaultToolkit().getScreenSize().getWidth() - windowWidth) / 2);
		int windowY = (int)((Toolkit.getDefaultToolkit().getScreenSize().getHeight() - windowHeight) / 2);
		this.setBounds(windowX, windowY, windowWidth, windowHeight);
		this.setLayout(null);
		this.setResizable(false);		
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setTitle(Language.get("Program.Title"));
		this.setLayout(new BorderLayout());

		// Create the tabPane
		this.tabbedPane = new JTabbedPane();
		this.tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
		this.tabbedPane.setFocusable(false);

		// Add modules to the tabPane
		this.tabbedPane.addTab(modules.blog.view.Panel.NAME, new modules.blog.view.Panel());

		// Add the tabPane and draw the gui
		this.add(this.tabbedPane, BorderLayout.CENTER);
		this.setVisible(true);
	}

}
